 <% provide(:title, "Products of "+ current_user.email) %> 
 <div class="span9" style="float:right">
  <h3 class="header-title">Products of <%= current_user.email %></h3>
  <div class="popover-content">
    <% if @my_pro.count > 0 %>
    <% @my_pro.each do |item| %>
    <div class="box-product">
      <div class="brief">
        <div class="img-polaroid" data-tooltip="sticky<%= item.id %>">
          <%= link_to image_tag(item.imageurl, alt: item.name), :controller => "products", :action => "show", :id => item.id %>
        </div>
        </div>
        <div align="center">
          <%= link_to "Edit", edit_product_path(item.id), style: "color:orangered" %> | 
          <%= link_to "Delete",{ :action => "destroy", :id => item.id },:confirm => "Are you sure?", :method => :delete, style: "color:orangered" %> 
        </div>
          <%= link_to truncate(item.name, :length => 40), :controller => "products", :action => "show", :id => item.id %><br/>
          <h2><%= item.price %> <b><%= item.currency %></b></h2><br/>
      </div>
      <% end %>
      <% else %>
      No items in database...
      <% end %>
    </div>
    <div style="clear:both;float:right"><%= will_paginate @my_pro %></div>
  </div>

  <!--HTML for the tooltips-->
  <div id="mystickytooltip" class="stickytooltip">
    <div style="padding:5px">
      <% if @my_pro.count > 0 %>
      <% @my_pro.each do |item| %>

      <div id="sticky<%= item.id %>" class="atip">
        <%= image_tag(item.imageurl, alt: item.name)%><br/>
        <b><%= item.name %></b><br/>
        <b>Price: <%= item.price %> <%= item.currency %></b>

      </div>
      <% end %>
      <% end %>

    </div>

    <div class="stickystatus"></div>
  </div>